/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Controladores;

import Entidades.Remito;
import java.util.List;
import logica.jpaControllers.RemitoJpaController;

/**
 *
 * @author USER
 */
public class CtrlRemito {

    /** Creates a new instance of CtrlABMArticulos */
    public CtrlRemito() {
    }
    //guarda articulo

    public void guardarRemito(Remito re) {
        RemitoJpaController ga = new RemitoJpaController();
        ga.create(re);
    }

    public void eliminarRemito(Remito re) throws Exception {
        RemitoJpaController ga = new RemitoJpaController();
        ga.destroy(re.getIdRemito());
    }

    public void modificarRemito(Remito re) throws Exception {
        RemitoJpaController ga = new RemitoJpaController();
        ga.edit(re);
    }

    public Remito buscarRemito_X_idRemito(int idremito) {
        RemitoJpaController ga = new RemitoJpaController();
        return ga.findRemito(idremito);

    }



    public List buscarTodosRemito() throws Exception {
        RemitoJpaController ga = new RemitoJpaController();
        return ga.findRemitoEntities();
    }

}
